package com.whiteape.book.model.dto;

import com.whiteape.book.model.bo.BaseMediaInfoBean;
import com.whiteape.book.utils.GsonUtils;

import org.greenrobot.greendao.converter.PropertyConverter;

import java.io.Serializable;

public class SiteSourceSearchResultBean extends BaseMediaInfoBean implements PropertyConverter<SiteSourceSearchResultBean, String>, Serializable {
    //搜索结果中的，表示书籍的列表规则
    private String list;
    private String detailUrl;

    public String getDetailUrl() {
        return detailUrl;
    }

    public void setDetailUrl(String detailUrl) {
        this.detailUrl = detailUrl;
    }

    public String getList() {
        return list;
    }

    public void setList(String list) {
        this.list = list;
    }

    @Override
    public SiteSourceSearchResultBean convertToEntityProperty(String databaseValue) {
        return GsonUtils.string2Obj(databaseValue, SiteSourceSearchResultBean.class);
    }

    @Override
    public String convertToDatabaseValue(SiteSourceSearchResultBean entityProperty) {
        return GsonUtils.obj2String(entityProperty);
    }

    @Override
    public String toString() {
        return "SiteSourceSearchResultBean{" +
                "list='" + list + '\'' +
                ", detailUrl='" + detailUrl + '\'' +
                '}' + super.toString();
    }
}